#pragma once
#ifndef __IEVENT_H__
#define __IEVENT_H__

#include <string>
#include <memory>

namespace NTrader
{

class IActor;

enum class EventType
{
	EVENT_REGISTOR = 0,
	EVENT_UNREGISTOR,
	EVENT_CLOSE,
	EVENT_TIMER,
	EVENT_DLAY_TIMER,
	EVENT_TEST
};

class IEvent
{
public:
	typedef std::shared_ptr<IEvent> Event_t;
	typedef std::shared_ptr<IActor> Actor_t;

	IEvent() = default;
	virtual ~IEvent() {};

	inline EventType GetEventType() { return _mEventType; };
	inline void SetEventType(EventType type) { this->_mEventType = type ; };

	virtual void Get(int,std::string&) {};
	virtual void Get(int,int&) {};
	virtual void Get(int,double) {};
	virtual void Get(EventType&) {};
	virtual Actor_t Get() { return nullptr; };
	virtual void Get(int64_t&) {};

	virtual void Set(int, std::string&) {};
	virtual void Set(int, int) {};
	virtual void Set(int, double) {};
	virtual void Set(EventType&) {};
	virtual void Set(Actor_t) {};
	virtual void Set(int64_t) {};

protected:
	EventType _mEventType;
};

}

#endif